package com.cedric.yixianpai.game.cards.Sects.swordCards.a_LianQi;

import com.cedric.yixianpai.game.Constants.CardType;
import com.cedric.yixianpai.game.Constants.Period;
import com.cedric.yixianpai.game.Status.DuelStatus;
import com.cedric.yixianpai.game.interfaces.SwordCard;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 云剑·探云
 */
@Component
public class Yun_TanYun extends SwordCard {

    /**
     * 云剑·探云 6/9/12
     */
    public Yun_TanYun(@Value("1") int lvl) {
        super("云剑·探云");
        this.setPeriod(Period.LIANQI);
        this.setDescription("6/9/12攻");
        this.setCardType(CardType.YUN);

        if (1 == lvl) {
            this.setDamage(6);
            this.setLevel(1);
        } else if (2 == lvl) {
            this.setDamage(9);
            this.setLevel(2);
        } else if (3 == lvl) {
            this.setDamage(12);
            this.setLevel(3);
        }else{
            throw new RuntimeException("错误的卡牌等级！");
        }
    }

    @Override
    public boolean effect(DuelStatus Sta1, DuelStatus Sta2) {
        Sta1.attack(Sta2,this.getDamage());
        Sta1.getPlayerBuff().setSwordIntent(0);
        return true;
    }
}
